from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import  time

driver =webdriver.Chrome()
driver.get('https://www.baidu.com') #打开百度
kw =driver.find_element(By.ID,'kw')#定位搜索框
kw.send_keys('天气预报')#输入天气预报
kw.send_keys(Keys.CONTROL, 'a')#全选
time.sleep(2)
kw.send_keys(Keys.CONTROL, 'c')#复制
time.sleep(2)

driver.get('https://www.so.com')#打开360搜索
input=driver.find_element(By.ID,'input')#定位搜索框
input.send_keys(Keys.CONTROL, 'v')#粘贴
driver.find_element(By.ID,'search-button').click()#点击搜索按钮
time.sleep(3)



driver.quit()